package com.zynote.nfhoujie.model;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Table;

/**
 * 
 * @className:User.java
 * @classDescription: 用户
 * @author: AIDAN SU
 * @createTime: 2012-9-28
 *
 */

@Entity
@Table(name = "t_user", catalog = "nfhoujie")
public class User implements java.io.Serializable {
	
	// 字段
	
	private static final long serialVersionUID = 7276296893420729474L;

	/** 用户ID */
	private Long uid;
	
	/** 用户名 */
	private String username;
	
	/** 密码 */
	private String password;
	
	/** 手机号码 */
	private String telPhone;
	
	/** 邮箱 */
	private String email;
	
	/** 昵称 */
	private String nickName;
	
	/** 性别 */
	private String gender;
	
	/** 用户类型 */
	private Integer userType;
	
	/** 用户状态 */
	private Integer userStatus;
	
	/** 创建时间 */
	private Date createTime;
	
	/** 最后修改时间 */
	private Date lastUpdateTime;
	
	// 构造方法 

	/** 默认构造方法 */
	public User() {
	}

	/** 完整的构造方法 */
	public User(String username, String password, String telPhone, String email, String nickName, 
			String gender, Integer userType, Integer userStatus, Date createTime, Date lastUpdateTime){
		this.username = username;
		this.password = password;
		this.telPhone = telPhone;
		this.email = email;
		this.nickName = nickName;
		this.gender = gender;
		this.userType = userType;
		this.userStatus = userStatus;
		this.createTime = createTime;
		this.lastUpdateTime = lastUpdateTime;		
	}

	// 访问属性方法
	
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "uid", unique = true, nullable = false)
	public Long getUid() {
		return this.uid;
	}

	public void setUid(Long uid) {
		this.uid = uid;
	}

	@Column(name = "username", length = 20)
	public String getUsername() {
		return this.username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	@Column(name = "password", length = 64)
	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}
	
	@Column(name = "telphone", length = 20)
	public String getTelPhone() {
		return this.telPhone;
	}

	public void setTelPhone(String telPhone) {
		this.telPhone = telPhone;
	}

	@Column(name = "email", length = 64)
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}
	
	@Column(name = "nickname", length = 20)
	public String getNickName() {
		return this.nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}
	
	@Column(name = "gender",length = 20)
	public String getGender() {
		return this.gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}
	
	@Column(name = "user_type", precision = 20, scale = 0)
	public Integer getUserType() {
		return this.userType;
	}

	public void setUserType(Integer userType) {
		this.userType = userType;
	}
	
	@Column(name = "user_status", precision = 20, scale = 0)
	public Integer getUserStatus() {
		return this.userStatus;
	}

	public void setUserStatus(Integer userStatus) {
		this.userStatus = userStatus;
	}

	@Column(name = "create_time", length = 20)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "last_update_time", length = 20)
	public Date getLastUpdateTime() {
		return this.lastUpdateTime;
	}

	public void setLastUpdateTime(Date lastUpdateTime) {
		this.lastUpdateTime = lastUpdateTime;
	}

}